<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1" import="com.aai.db.*,com.aai.*,java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
	<%
		MySQLConnect sql =MySQLConnect.getInstance();
		Connection con = sql.connect();
		if (con != null) {
			String sqlRequest = "SELECT * FROM members WHERE username = '"
					+ request.getParameter("pseudo") + "'";
			Statement st = con.createStatement();
			ResultSet val = st.executeQuery(sqlRequest);

			val.last();
			int i = val.getRow();

			if (i == 0) {
				Connection con2 = sql.connect();
				if (con2 != null) {
					sqlRequest = "SELECT * FROM members_to_validate WHERE username = '"
							+ request.getParameter("pseudo") + "'";
					st = con.createStatement();
					val = st.executeQuery(sqlRequest);

					val.last();
					i = val.getRow();
					if (i == 0)
						out.print("<img width='20' src='images/ok.png' />");
					else
						out.print("<img width='20' src='images/notok.png' />");
				}
			} else
				out.print("<img width='20' src='images/notok.png' />");
		} else
			out.print("<img width='20' src='images/notok.png' />");
	%>
</body>
</html>